﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StructureMap;

namespace WebApp.Bootstrap.StructureMap
{
    public sealed class Bootstrapper
    {
        public static IContainer ConfigureStructureMap()
        {
            ObjectFactory.Configure(x =>
            {
                x.Scan(scan =>
                {
                    scan.WithDefaultConventions();
                });

                x.AddRegistry<SRegistry>();
                x.AddRegistry<DBRegistry>();
            });
            return ObjectFactory.Container;


            //var container = new Container(x =>
            //{
            //    x.Scan(scan =>
            //    {
            //        scan.WithDefaultConventions();
            //    });

            //    x.AddRegistry<SRegistry>();
            //    x.AddRegistry<DBRegistry>();
            //});

            //return container;
        }
    }
}